package cn.ligoo.dtu.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.ligoo.dtu.dao.CustomerInfoDao;
import cn.ligoo.dtu.domain.CustomerInfo;
import cn.ligoo.dtu.service.CustomerInfoService;

/**
 * @author Jin,QingHua
 * @version 2012-07-24 12:18:52
 */
@Service
public class CustomerInfoServiceImpl implements CustomerInfoService {

	@Resource
	private CustomerInfoDao customerInfoDao;

	@Override
	public Integer createCustomerInfo(CustomerInfo t) {
		this.customerInfoDao.insertEntity(t);
		return t.getId();
	}

	@Override
	public int modifyCustomerInfo(CustomerInfo t) {
		return this.customerInfoDao.updateEntity(t);
	}

	@Override
	public int removeCustomerInfo(CustomerInfo t) {
		return this.customerInfoDao.deleteEntity(t);
	}

	@Override
	public CustomerInfo getCustomerInfo(CustomerInfo t) {
		return this.customerInfoDao.selectEntity(t);
	}

	@Override
	public Integer getCustomerInfoCount(CustomerInfo t) {
		return this.customerInfoDao.selectEntityCount(t);
	}

	@Override
	public List<CustomerInfo> getCustomerInfoList(CustomerInfo t) {
		return this.customerInfoDao.selectEntityList(t);
	}

}
